#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

#include "list.h"


void test1()
{
	LTNode* phead = ListInit();
	ListPushBack(phead, 1);
	ListPushBack(phead, 2);
	ListPushBack(phead, 3);
	ListPushBack(phead, 4);
	ListPrint(phead);

	ListPushFront(phead, 0);
	ListPushFront(phead, -10);
	ListPushFront(phead, -100);
	ListPrint(phead);

	ListPopBack(phead);
	ListPopBack(phead);
	ListPopFront(phead);
	ListPopFront(phead);
	ListPrint(phead);

	LTNode* pos = ListFind(phead, 0);
	if (pos)
	{
		ListInsert(pos, 10);
	}
	ListPrint(phead);

	ListDestroy(phead);
	phead = NULL;
}

int main()
{
	test1();
	return 0;
}